import { Component, OnInit } from '@angular/core';
import { MenuItem } from '@iux/live';

@Component({
  templateUrl: './demo5.component.html',
})
export class Demo5Component implements OnInit {
  menus: MenuItem[];

  ngOnInit() {
    this.menus = this.getMenus();
  }

  getMenus() {
    const data = [
      {
        id: '1',
        label: 'MenuItem 01',
        items: [
          {
            id: '11',
            label: 'MenuItem 11',
          },
          {
            id: '12',
            label: 'MenuItem 12',
          },
          {
            id: '13',
            label: 'MenuItem 13',
          },
        ],
      },
      {
        id: '2',
        label: 'MenuItem 02',
        items: [
          {
            id: '21',
            label: 'MenuItem 21',
          },
          {
            id: '22',
            label: 'MenuItem 22',
          },
        ],
      },
      {
        id: '3',
        label: 'MenuItem 03',
      },
      {
        id: '4',
        label: 'MenuItem 04',
      },
    ];
    return data;
  }
}
